package com.njwb.day02;

import java.util.Scanner;

public class ccc {
    public static void main(String[] args) {


        Scanner scanner=new Scanner(System.in);
        System.out.print("请输入行列大小：");
        int x=scanner.nextInt();
/*        for(int i=0;i<x;i++){
            for (int k=0;k<x;k++){

                System.out.print("* ");


            }
            System.out.println();

        }

        System.out.println("--------------");
        for (int i=0;i<x;i++){
            for (int k=0;k<x;k++){
                if (i==0||i==x-1||k==0||k==x-1){
                    System.out.print("* ");
                }
                else{
                    System.out.print("  ");
                }
            }
            System.out.println();

        }

        System.out.println("--------------");

        for(int i=0;i<x;i++){
            for (int k=0;k<=i;k++){

                    System.out.print("* ");
            }
            System.out.println();
        }
        System.out.println("--------------");


        for (int i=0;i<x;i++){
            for (int k=0;k<=i;k++){
                if (i==0||i==x-1||k==0||k==i){
                    System.out.print("* ");
                }
                else{
                    System.out.print("  ");
                }
            }
            System.out.println();

        }
        System.out.println("--------------");
        for (int i=1;i<=9;i++){
            for (int k=1;k<=i;k++){

                System.out.print(k+"*"+i+"="+i*k+"  ");
            }
            System.out.println();
        }
        System.out.println("--------------");

        for (int i=1;i<10;i++){
            for (int k=0;k<10;k++){
                for (int l=0;l<10;l++){
                    if (i*100+k*10+l==i*i*i+k*k*k+l*l*l){
                        System.out.println(i+""+k+""+l);
                    }


                }

            }

        }


        System.out.println("--------------");
        int sum=0;
        for (int i=1;i<=100;++i){
            sum+=i;
        }
        System.out.println(sum);

        System.out.println("--------------");
        for (int i=10;i>0;i--)
        {
            System.out.println(i);
        }


        System.out.println("--------------");*/
for (int i=x;i>0;i--){
    for (int i1=0;i1<x;i1++){
        if (i1==i-1){
            System.out.print(" *");
        }
        else{
            System.out.print("  ");
        }
    }
    System.out.print(" ");
    for (int i2=x;i2>0;i2--){
        if (i2==i){
            System.out.print("* ");
        }
        else{
            System.out.print("  ");
        }
    }
    System.out.println();

}
        for (int i=0;i<x;i++){
            for (int i1=0;i1<x;i1++){
                if (i1==i){
                    System.out.print(" *");
                }
                else{
                    System.out.print("  ");
                }
            }
            System.out.print(" ");
            for (int i2=x-1;i2>=0;i2--){
                if (i2==i){
                    System.out.print("* ");
                }
                else{
                    System.out.print("  ");
                }
            }
            System.out.println();

        }

    }
}
